www.gusucode.com > matlab从零到进阶程序与数据 > matlab从零到进阶程序与数据/第4章 MATLAB程序设计/NestedFunctionCallDemo3.m

    function  NestedFunctionCallDemo3
Nested1(5)
    function  Nested1(x)
        disp(['Nested1执行,输入:',num2str(x)])
        Nested2(6)
        function  Nested11(xx)
            disp(['Nested11执行,输入:',num2str(xx)]);
        end
    end
    function  Nested2(y)
        disp(['Nested2执行,输入:',num2str(y)])
        function  Nested22(yy)
            disp(['Nested22执行,输入:',num2str(yy)]);
        end
    end
end